Ubuntu 10.04
Sponsored Link

Install PHP
2010/07/24
[1] Install PHP
root@www05:~#
aptitude -y install php5 php5-cgi libapache2-mod-php5 php5-common php-pear


root@www05:~#
vi /etc/apache2/mods-enabled/mime.conf


# near line 166: add extension for PHP

AddHandler php5-script .php


root@www05:~#
/etc/init.d/apache2 restart

  * Restarting web server apache2
  ... waiting ...done.
[2] Create a PHP test page and access to it with web browser. It's OK if following page is shown.
root@www05:~#
vi /var/www/index.php


<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;">
<?php
print Date("Y/m/d");

?>
</div>
</body>
</html>
 
 
Tweet